package com.bcxj.apidriver.service;

import com.bcxj.apidriver.client.ServiceDriverUserClient;
import com.bcxj.internalcommon.dto.ResponseResult;
import com.bcxj.internalcommon.entity.DriverCarBindingRelationship;
import com.bcxj.internalcommon.entity.DriverUser;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * ClassName: DriverUserService
 * Package: com.bcxj.apidriver.service
 * Description:
 *
 * @Author BCXJ
 * @Create 2024/10/19 17:02
 * @Version 1.0
 * @Since 1.0
 */
@Service
public class DriverUserService {

    @Autowired
    private ServiceDriverUserClient serviceDriverUserClient;

    public ResponseResult updateDriverUser(DriverUser driverUser) {
        return serviceDriverUserClient.updateUser(driverUser);
    }

    /**
     * 根据司机的手机号获取car的信息
     * @param driverPhone
     * @return
     */
    public ResponseResult<DriverCarBindingRelationship> getDriverCarBindingRelationship(String driverPhone) {
        return serviceDriverUserClient.getDriverCarBindingRelationship(driverPhone);
    }
}
